home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / modules.lha / modules / rtgmaster / rtgsublibs.m < prev   
Encoding:
Text File  |  2000-06-15  |  13.8 KB  |  318 lines

  1. /*
  2. **     $VER: rtgsublibs.h 1.009 (15 Jan 1998)
  3. */
  4.  
  5. MODULE    'utility/tagitem'
  6.             'exec/nodes'
  7.  
  8. // The TagItem ID's (ti_Tag values) for OpenRtgScreen()
  9. // Information like width, height, screenmode to use, depth and overscan
  10. // information is located in the ScreenReq structure which must be passed
  11. // to OpenRtgScreen().  The RtgScreenModeReq() function creates these
  12. // ScreenReq structures for you.
  13. #define rtg_Dummy  TAG_USER
  14. #define rtg_Buffers  (rtg_Dummy + $01)
  15. // [1] You can use this tag to specify the number
  16. // of screen buffers for your screen.  Setting this
  17. // to 2 or 3 will allow you to do Double or Triple
  18. // buffering.  Valid values are 1, 2 or 3.
  19.  
  20. #define rtg_Interleaved  (rtg_Dummy + $02)
  21. // [FALSE] Specifying TRUE will cause bitmaps to
  22. // be allocated interleaved.  OpenRtgScreen will
  23. // fail if bitplanes cannot be allocated that way
  24. // unlike Intuition/OpenScreenTagList().
  25.  
  26. #define rtg_Draggable  (rtg_Dummy + $03)
  27. // [TRUE] Specifying FALSE will make the screen
  28. // non-draggable.  Do not use without good reason!
  29.  
  30. #define rtg_Exclusive  (rtg_Dummy + $04)
  31. // [FALSE] Allows screens which won't share the
  32. // display with other screens.  Use sparingly!
  33. // #define rtg_ChunkySupport (rtg_Dummy + 0x05)
  34. //
  35. // [0] This LONG is used to indicate which
  36. // Chunky modes this application supports.  A
  37. // set bit means the mode is supported:
  38. // ;    ;
  39. // ;    ;    | Pixels  | Pixel|Color| Pixel
  40. // ;    ; Bit|represent| size |space| layout
  41. // ;    ;------------------------------------------------------------------
  42. // ;    ;  0  TrueColor  LONG   RGB   %00000000 rrrrrrrr gggggggg bbbbbbbb  ARGB32
  43. // ;    ;  1  TrueColor 3 BYTE  RGB   %rrrrrrrr gggggggg bbbbbbbb           RGB24
  44. // ;    ;  2  TrueColor  WORD   RGB   %rrrrrggg gggbbbbb                    RGB16
  45. // ;    ;  3  TrueColor  WORD   RGB   %0rrrrrgg gggbbbbb                    RGB15
  46. // ;    ;  4  TrueColor  LONG   BGR   %00000000 bbbbbbbb gggggggg rrrrrrrr  ABGR32
  47. // ;    ;  5  TrueColor 3 BYTE  BGR   %bbbbbbbb gggggggg rrrrrrrr           BGR24
  48. // ;    ;  6  TrueColor  WORD   BGR   %bbbbbggg gggrrrrr                    BGR16
  49. // ;    ;  7  TrueColor  WORD   BGR   %0bbbbbgg gggrrrrr                    BGR15
  50. // ;    ;  8  TrueColor  LONG   RGB   %rrrrrrrr gggggggg bbbbbbbb 00000000  RGBA32
  51. // ;    ;  9  ColorMap   BYTE   -     -                                     LUT8
  52. // ;    ; 10  Graffiti   BYTE   -     - (Graffiti style chunky, very special)
  53. // ;    ; 11  TrueColor  WORD   RGB   %gggbbbbb 0rrrrrgg                    RGB15PC
  54. // ;    ; 12  TrueColor  WORD   BGR   %gggrrrrr 0bbbbbgg                    BGR15PC
  55. // ;    ; 13  TrueColor  WORD   RGB   %gggbbbbb rrrrrggg                    RGB16PC
  56. // ;    ; 14  TrueColor  WORD   BGR   %gggrrrrr bbbbbggg                    BGR16PC
  57. // ;    ; 15  TrueColor  LONG   BGR   %bbbbbbbb gggggggg rrrrrrrr 00000000  BGRA32
  58. //;
  59. //    ; This table is by no means complete.  There are probably more modes
  60. //    ; available on common Amiga graphic cards, but I have no information
  61. //    ; on them yet.  If you know about such modes please contact me.
  62. //
  63. //    ; Setting this LONG to zero means your application doesn't support
  64. //    ; any Chunky orientated display modes.
  65. //
  66. //    #define rtg_PlanarSupport (rtg_Dummy + 0x06)
  67. //                            ;[0] This LONG is used to indicate which
  68. //                            ;Planar modes this application supports.  A
  69. //                            ;set bit means the mode is supported:
  70. //    ; Bit 0: Indicates it supports 1 bitplane non-interleaved
  71. //    ; Bit 1: Indicates it supports 2 bitplanes non-interleaved
  72. //    ; (...)
  73. //    ; Bit 7: Indicates it supports 8 bitplanes non-interleaved
  74. //
  75. //    ; Bit 16: Indicates it supports 1 bitplane interleaved
  76. //    ; Bit 17: Indicates it supports 2 bitplanes interleaved
  77. //    ; (...)
  78. //    ; Bit 23: Indicates it supports 8 bitplanes interleaved
  79. //
  80. //    ; Bit 15: Indicates it supports EHB mode (6 bitplanes) non-interleaved
  81. //    ; Bit 31: Indicates it supports EHB mode (6 bitplanes) interleaved
  82. //
  83. //    ; Note that all planar modes are color-mapped.  Bits 8-14 and 24-30
  84. //    ; are unused for now, but could be used later to support planar modes
  85. //    ; with even higher number of bitplanes.
  86. //
  87. //    ; Setting this LONG to zero means your application doesn't support
  88. //    ; any Planar orientated display modes.
  89.  
  90. #define ARGB32  1
  91. #define RGB24   2
  92. #define RGB16   4
  93. #define RGB15   8
  94. #define ABGR32  16
  95. #define BGR24   32
  96. #define BGR16   64
  97. #define BGR15   128
  98. #define RGBA32  256
  99. #define LUT8    512
  100. #define GRAFFITI  1024
  101. #define RGB15PC   2048
  102. #define BGR15PC   4096
  103. #define RGB16PC   8192
  104. #define BGR16PC   16384
  105. #define BGRA32    32768
  106. #define Planar1   1
  107. #define Planar2   2
  108. #define Planar3   4
  109. #define Planar4   8
  110. #define Planar5   16
  111. #define Planar6   32
  112. #define Planar7   64
  113. #define Planar8   128
  114. #define Planar1I  1<<16
  115. #define Planar2I  1<<17
  116. #define Planar3I  1<<18
  117. #define Planar4I  1<<19
  118. #define Planar5I  1<<20
  119. #define Planar6I  1<<21
  120. #define Planar7I  1<<22
  121. #define Planar8I  1<<23
  122. #define PlanarEHB  1<<15
  123. #define PlanarEHBI  1<<31
  124. #define rtg_ZBuffer  (rtg_Dummy + $07)
  125. // Allocate a Z-Buffer. Only works with sublibraries that implement the rtgmaster 3D Extensions.
  126.  
  127. #define rtg_Use3D  (rtg_Dummy + $08)
  128. // Use the 3D Chips. (You can only do conventional Double/Triple-Buffering, if you do NOT use
  129. // them. If you use them, the Extra Buffers are used by the 3D Chips)
  130.  
  131. #define rtg_Workbench  (rtg_Dummy + $09)
  132. // Open a Window on the Workbench, instead of a Screen. This Tag takes the Colorformat
  133. // to use with CopyRtgBlit() as Parameter
  134. // End of OpenRtgScreenTagList() enumeration ***
  135. // This structure is private and for the internal use of RtgMaster.library
  136. // and its sub-libraries ONLY.  This structure will change in the future.
  137.  
  138. #define rtg_MouseMove  (rtg_Dummy+ $0A)
  139. // RtgGetMsg also returns IDCMP_MOUSEMOVE messages
  140.  
  141. #define rtg_DeltaMove  (rtg_Dummy+ $0B)
  142. // RtgGetMsg also returns IDCMP_MOUSEMOVE messages, and it returns Delta-Values,
  143. // not absolute values.
  144.  
  145. #define rtg_PubScreenName  (rtg_Dummy+ $0C)
  146. // Open a Window on a Public Screen with the provided Public Screen Name.
  147. // Note: This does not work with all Sublibraries. Some simply ignore this
  148. // (For example EGS...)
  149.  
  150. OBJECT RtgDimensionInfo
  151.     Width:ULONG,
  152.     Height:ULONG
  153.  
  154. // This structure is private and for the internal use of RtgMaster.library
  155. // and its sub-libraries ONLY.  This structure will change in the future.
  156. OBJECT ScreenMode
  157.     ScrNode:MinNode,                      // ln_Succ and ln_Pred from ListNode structure
  158.     Name:PTR TO UBYTE,
  159.     Description:PTR TO UBYTE,             // Description of the graphics board this mode
  160.     GraphicsBoard:ULONG,                  // The graphics board this mode requires
  161.     ModeID:ULONG,                         // ModeID (depends on sm_GraphicsBoard)
  162.     Reserved[8]:BYTE,                     // 8 bytes reserved space for use of the sub-library
  163.     MinWidth:ULONG,                       // minimum width in pixels
  164.     MaxWidth:ULONG,                       // maximum width in pixels
  165.     MinHeight:ULONG,                      // Minimum height in pixels
  166.     MaxHeight:ULONG,                      // Maximum height in pixels
  167.     Default:RtgDimensionInfo,             // Standard width and height of this ScreenMode
  168.     TextOverscan:RtgDimensionInfo,        // Settable via preferences
  169.     StandardOverscan:RtgDimensionInfo,    // Settable via preferences
  170.     MaxOverscan:RtgDimensionInfo,         // Maximum width and height (without the
  171.     ChunkySupport:ULONG,                  // This LONG is used to indicate which Chunky
  172.     PlanarSupport:ULONG,                  // This LONG is used to indicate which Planar
  173.     PixelAspect:ULONG,                    // For a PAL 320x256 screen you have to write
  174.     VertScan:ULONG,                       // Vertical scan rate of this screenmode
  175.     HorScan:ULONG,                        // Horizontal scan rate of this screenmode
  176.     PixelClock:ULONG,                     // Pixelclock rate (in Hz)
  177.     VertBlank:ULONG,                      // Vertical blank rate of this screenmode
  178.     Buffers:ULONG,                        // The number of buffers this ScreenMode can
  179.     BitsRed:UWORD,                        // The number of bits per gun for Red
  180.     BitsGreen:UWORD,                      // The number of bits per gun for Green
  181.     BitsBlue:UWORD                        // The number of bits per gun for Blue
  182.  
  183. // The TagItem ID's (ti_Tag values) for GetRtgScreenData()
  184. // These tags are used to return data to the user about the RtgScreen
  185. // structure in a future compatible way.
  186. #define grd_Dummy  TAG_USER
  187. #define grd_Width  (grd_Dummy + $01)
  188. // Gets you the Width in pixels of the screen
  189.  
  190. #define grd_Height  (grd_Dummy + $02)
  191. // Gets you the Height in pixels of the screen
  192.  
  193. #define grd_PixelLayout  (grd_Dummy + $03)
  194. // Gets you the pixellayout of the screen, see
  195. // defines below.  This also tells you whether
  196. // the screen is Chunky or Planar
  197.  
  198. #define grd_ColorSpace  (grd_Dummy + $04)
  199. // Gets you the colorspace of the screen, see
  200. // defines below
  201.  
  202. #define grd_Depth  (grd_Dummy + $05)
  203. // The number of colors LOG 2.  For Planar modes
  204. // this also tells you the number of bitplanes.
  205. // Don't rely on this number except to get the
  206. // number of colors for Chunky modes.
  207.  
  208. #define grd_PlaneSize  (grd_Dummy + $06)
  209. // Tells you the number of bytes to skip to get
  210. // to the next (bit)plane.  You can use this to
  211. // find the start addresses of the other (bit)planes
  212. // in Planar and in (BytePlane) Chunky modes
  213.  
  214. #define grd_BytesPerRow  (grd_Dummy + $07)
  215. // The number of bytes taken up by a row.  This
  216. // refers to one (bit/byte)plane only for modes
  217. // working with planes.
  218.  
  219. #define grd_MouseX  (grd_Dummy + $08)
  220. // Finds out the Mouse X position
  221.  
  222. #define grd_MouseY  (grd_Dummy + $09)
  223. // Finds out the Mouse Y position
  224. // The TagItem ID's (ti_Tag values) for GetGfxCardData()
  225. // These tags are used to return data to the user about the graphics card
  226. // which the RtgScreen uses.
  227.  
  228. #define grd_BusSystem  (grd_Dummy + $0A)
  229. #define grd_3DChipset  (grd_Dummy + $0B)
  230.  
  231. // For usage with the rtgmaster 3D Extensions, will be ignored from sublibraries
  232. // that do not support the 3D Extensions.
  233. #define grd_Z3  1    // Zorro III Bus
  234. #define grd_Z2  2    // Zorro II Bus
  235. #define grd_Custom  3    // Custom Chipset
  236. #define grd_RGBPort  4    // Board connected to RGB Port
  237. #define grd_GVP  5    // GVP "special" Bus of GVP Turbo Board (EGS110 GFX Board)
  238. #define grd_DDirect  6    // DraCo Direct Bus
  239.  
  240. // defines for grd_PixelLayout
  241. #define grd_PLANAR      0    // Non interleaved planar layout [X bitplanes/pixel]
  242. #define grd_PLANATI     1    // Interleaved planar layout     [X bitplanes/pixel]
  243. #define grd_CHUNKY      2    // 8-bit Chunky layout           [BYTE/pixel]
  244. #define grd_HICOL15     3    // 15-bit Chunky layout          [WORD/pixel]
  245. #define grd_HICOL16     4    // 16-bit Chunky layout          [WORD/pixel]
  246. #define grd_TRUECOL24   5    // 24-bit Chunky layout          [3 BYTES/pixel]
  247. #define grd_TRUECOL24P  6    // 24-bit Chunky layout          [3 BYTEPLANES/pixel]
  248. #define grd_TRUECOL32   7    // 24-bit Chunky layout          [LONG/pixel]
  249. #define grd_GRAFFITI    8    // 8-bit Graffiti-type Chunky layout (very special...)
  250. #define grd_TRUECOL32B  9
  251.  
  252. // defines for grd_ColorSpace
  253. #define grd_Palette  0    // Mode uses a Color Look-Up Table (CLUT)
  254. #define grd_RGB      1    // Standard RGB color space
  255. #define grd_BGR      2    // high-endian RGB color space, BGR
  256. #define grd_RGBPC    3    // RGB with lowbyte and highbyte swapped
  257. #define grd_BGRPC    4    // BGR with lowbyte and highbyte swapped
  258.  
  259. // End of GetRtgScreenData() enumeration ***
  260. // Information about the RtgScreenModeReq tags:
  261. //
  262. // Each tag specified for the RtgScreenModeReq() function limits in some
  263. // way the number of ScreenModes available to the user.  Sometimes this
  264. // means a screenmode is completely ommited, and sometimes this means
  265. // certain screenmodes can only be used if the user selects them to
  266. // be wide enough.  So for example, a ScreenMode which supports screens
  267. // of 300 to 400 pixels in width, could be filtered out completely by
  268. // setting smr_MinWidth to 401.  But if the smr_MinWidth is set to for
  269. // example 320 then the user is allowed to select a width of 320-400
  270. // pixels (for this ScreenMode, and if the smr_MaxWidth allows this).
  271. // If smr_MinWidth is 200 pixels then the ScreenMode is the limiting
  272. // factor which means the user can't select ScreenModes smaller than
  273. // 300 pixels.
  274. //
  275. // The PlanarSupport and ChunkySupport tags determine which ScreenModes
  276. // are available to the user depending on their layout and number of
  277. // colors.
  278. // This structure is private and for the internal use of RtgMaster.library
  279. // and its sub-libraries ONLY.  This structure will change in the future.
  280. OBJECT ScreenReq
  281.     ScreenMode:PTR TO ScreenMode,    // Ptr to ScreenMode structure
  282.     Width:ULONG,                     // Must be within Tag specified limits
  283.     Height:ULONG,                    // The width and height which the user selected
  284.     Depth:UWORD,                     // Number of colors log2 which the user selected
  285.     Overscan:UWORD,                  // 0 = No Overscan.  See defines below.
  286.     Flags:UBYTE                      // For the meaning of the bits see below
  287.  
  288. OBJECT ScreenReqList
  289.     SRNode:MinNode,
  290.     req:PTR TO ScreenReq
  291.  
  292. // Bits set in ScreenMode.Flags
  293. #define sq_EHB           (1 << 0)      // EHB selected (sq_Depth = 6)
  294. #define sq_CHUNKYMODE    (1 << 1)      // Chunky Mode selected
  295. #define sq_DEFAULTX      (1 << 2)      // Default Width selected
  296. #define sq_DEFAULTY      (1 << 3)      // Default Height selected
  297.  
  298. // defines for Overscan
  299. #define sq_NOOVERSCAN        0
  300. #define sq_TEXTOVERSCAN      1    // User settable, should be entirely visible
  301. #define sq_STANDARDOVERSCAN  2    // Standard overscan (just past edges)
  302. #define sq_MAXOVERSCAN       3    // Maximum overscan (as much as possible)
  303.  
  304. // This structure is private and for the internal use of RtgMaster.library
  305. // and its sub-libraries ONLY.  This structure will change in the future.
  306. OBJECT RtgScreen
  307.     LibBase:ULONG,
  308.     LibVersion:UWORD,
  309.     Pad1:UWORD,
  310.     GraphicsBoard:ULONG,
  311.     Reserved[20]:BYTE,
  312.     MouseX:ULONG,
  313.     MouseY:ULONG,
  314.     c2pcode:PTR,
  315.     c2pdata:PTR,
  316.     c2pcurr:ULONG,
  317.     c2pname[30]:BYTE
  318.